package com.sdhs.paas.sso.sp;

import java.io.InputStream;

import org.apache.log4j.Logger;
import java.util.Properties;

public class SsoUtil {
	private static Logger logger = Logger.getLogger(SsoUtil.class);
	private static Properties prop = new Properties();
	static {
		InputStream inputStream = null;
		try {
			inputStream = SsoUtil.class.getResourceAsStream("/spSsoUtil.properties");
			prop.load(inputStream);
		} catch (Exception e) {
			logger.error(e.toString(), e);
		} finally {
			try {
				if (null != inputStream) {
					inputStream.close();
				}
			} catch (Exception e) {
				logger.error(e.toString(), e);
			}
		}

	}
	/**
	 * 获取value值
	 * 
	 * @param key
	 * @return
	 */
	public static String getValue(String key) {
		String value = "";
		if (null != key && prop.containsKey(key)) {
			value = prop.getProperty(key);
		}
		return value;
	}
}
